class Cat:
    name = ""
    tili = 0

    def __init__(self,n,t) -> None:
        self.name =n
        self.tili =t

    def play(self):
        self.tili-=20
        print("%s玩耍"% self.name)
        self.status()

    def sleep(self):
        self.tili=100
        print("%s睡觉"% self.name)
        self.status()

    def status(self):
        print("%s目前体力是%s"%(self.name,self.tili))


cat = Cat("猫咪",100)
cat.play()

